{% extends "base.html" %}
{% block title %}Rule Sources{% endblock %}
{% block content %}
    <div class="row">
        <div class="small-6 large-centered columns">
            <h2>Rule Sources</h2>
        </div>
    </div>
    {% for src in sources %}
    <div class="row">
        <div class="small-8 columns">
            <ul class="vcard">
                <li class="fn">{{ src.name }}</li>
                <li class="locality">{{ src.uri }}</li>
                {% if src.note %}
                <li>Comment: {{ src.note }}</li>
                {% endif %}
                <li><img class="del-rs right" data-rs-id="{{ src.id }}" src="/static/img/trash-24.png"/></li>
            </ul>
        </div>
    </div>
    {% endfor %}
    <div class="row">
        <div class="small-12">
            <hr>
        </div>
    </div>
    <form id="src-form">
        <input id="_csrf_token" name="_csrf_token" type="hidden" value="{{ csrf_token() }}">
        <div class="row">
            <div class="small-6 small-centered columns">
                <input id="name" type="text" placeholder="Name" />
            </div>
        </div>
        <div class="row">
            <div class="small-6 small-centered columns">
                <input id="uri" type="text" placeholder="URL" />
            </div>
        </div>
        <div class="row">
            <div class="small-6 small-centered columns">
                <input id="note" type="text" placeholder="Comment" />
            </div>
        </div>
        <div class="row">
            <div class="small-3 push-3 columns">
                <div id="alert-text" style="display:none;" data-alert class="alert-box warning round">
                    <div id="error-txt"></div>
                </div>
            </div>
            <div class="small-3 pull-3 columns">
                <input id="add-src" type="button" class="small button right" value="ADD SOURCE"  />
            </div>
        </div>
    </form>
{% endblock %}
